<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link rel="stylesheet" th:href="@{/css/main/layui.css}">
<style type="text/css">
	#queryPoint {
		margin-right: 300px;
		margin-top: 30px;
	}
</style>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-iPoint-edit" th:object="${iPoint}" >
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<input name="lineId" type="hidden" id="line_id"/>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">所属变压器ID：</label>
				<div class="col-sm-8">
					<input id="byqId" name="byqId" th:field="*{byqId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" >
				<label class="col-sm-3 control-label">点位类型：</label>
				<div class="col-sm-8">
					<input id="type" name="type" th:field="*{type}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" >
				<label class="col-sm-3 control-label">点位编号：</label>
				<div class="col-sm-8">
					<input id="code" name="code" th:field="*{code}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">所属线路：</label>
				<div class="col-sm-8">
					<input id="line_name" name="lineName" th:field="*{lineName}" class="form-control" type="text" onclick="chooseLine()">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">电压等级：</label>
				<div class="col-sm-8">
					<!--<input id="voltage" name="voltage" th:field="*{voltage}" class="form-control" type="text">-->
					<!--<select id="voltage" class="form-control" name="voltage"
							th:with="type=${@dict.getType('voltage_grade')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:field="*{voltage}"></option>
					</select>-->
					<select id="voltage" class="form-control" name="voltage" th:field="*{voltage}" readonly>
						<option value="10kv">10kv</option>
						<option value="400v">400v</option>
						<option value="220v">220v</option>
					</select>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">上联点位：</label>
				<div class="col-sm-8">
					<input id="upId" name="upId" th:field="*{upId}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">下联点位：</label>
				<div class="col-sm-8">
					<input id="lowerId" name="lowerId" th:field="*{lowerId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">定位档距：</label>
				<div class="col-sm-8">
					<input id="span" name="span" th:field="*{span}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" >
				<label class="col-sm-3 control-label">定位经度：</label>
				<div class="col-sm-8">
					<input id="lgt" name="lgt" th:field="*{lgt}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" >
				<label class="col-sm-3 control-label">定位纬度：</label>
				<div class="col-sm-8">
					<input id="lat" name="lat" th:field="*{lat}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">拉线数：</label>
				<div class="col-sm-8">
					<input id="pullNum" name="pullNum" th:field="*{pullNum}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">是否导线分段：</label>
				<div class="col-sm-8">
					<input id="wireSplit" name="wireSplit" th:field="*{wireSplit}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">导线型号：</label>
				<div class="col-sm-8">
					<input id="materId" name="materId" th:field="*{materId}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">进户线长度：</label>
				<div class="col-sm-8">
					<input id="inletLine" name="inletLine" th:field="*{inletLine}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">是否同杆架设：</label>
				<div class="col-sm-8">
					<input id="isPole" name="isPole" th:field="*{isPole}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">同杆架设组：</label>
				<div class="col-sm-8">
					<input id="poleId" name="poleId" th:field="*{poleId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">角度：</label>
				<div class="col-sm-8">
					<input id="angle" name="angle" th:field="*{angle}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">杆高：</label>
				<div class="col-sm-8">
					<!--<input id="poleHeight" name="poleHeight" th:field="*{poleHeight}" class="form-control" type="text" readonly>-->
					<select id="poleHeight" class="form-control" name="poleHeight"
							th:with="type=${@dict.getType('pole_height')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:field="*{poleHeight}"></option>
					</select>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">被跨越物类型：</label>
				<div class="col-sm-8">
					<!--<input id="crossType" name="crossType" th:field="*{crossType}" class="form-control" type="text">-->
					<select id="crossType" class="form-control" name="crossType"
							th:with="type=${@dict.getType('cross_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{crossType}"></option>
					</select>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">创建日期：</label>
				<div class="col-sm-8">
					<input id="addDate" name="addDate" th:field="*{addDate}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">创建人：</label>
				<div class="col-sm-8">
					<input id="addUser" name="addUser" th:field="*{addUser}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">最近更新人：</label>
				<div class="col-sm-8">
					<input id="updateUser" name="updateUser" th:field="*{updateUser}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">最近更新日期：</label>
				<div class="col-sm-8">
					<input id="updateDate" name="updateDate" th:field="*{updateDate}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">数据状态：</label>
				<div class="col-sm-8">
					<input id="datastate" name="datastate" th:field="*{datastate}" class="form-control" type="text">
				</div>
			</div>
			<!--<div class="layui-layer-btn layui-layer-btn-" >
				<input class="btn btn-success" type="button" id="queryPoint" onclick="submitPoint()" value="提交" />
			</div>-->
		</form>


		<form class="form-horizontal m" id="form-bByq-edit" th:object="${bByq}">
			<input id="ids" name="id" th:field="*{id}"  type="hidden">
			<input name="deptId" type="hidden" id="treeId"/>
			<input name="upLineId" type="hidden" id="line_ids"/>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">点位ID：</label>
				<div class="col-sm-8">
					<input id="pointId" name="pointId" th:field="*{pointId}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">设备名称：</label>
				<div class="col-sm-8">
					<input id="name" name="name" th:field="*{name}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">运行编号：</label>
				<div class="col-sm-8">
					<input id="runCode" name="runCode" th:field="*{runCode}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">专/公变：</label>
				<div class="col-sm-8">
					<!--<input id="zgb" name="zgb" th:field="*{zgb}" class="form-control" type="text">-->
					<!--<select id="zgb" class="form-control" name="zgb"-->
					<!--th:with="type=${@dict.getType('transformer_type')}">-->
					<!--<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{zgb}"></option>-->
					<!--</select>-->
					<select id="zgb" class="form-control" name="zgb" th:field="*{zgb}" readonly>
						<option value="专变">专变</option>
						<option value="公变">公变</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">规格型号：</label>
				<div class="col-sm-8">
					<input id="model" name="model" th:field="*{model}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">电压等级：</label>
				<div class="col-sm-8">
					<!--<input id="voltage" name="voltage" th:field="*{voltage}" class="form-control" type="text">-->
					<!--<select id="voltage" class="form-control" name="voltage"-->
					<!--th:with="type=${@dict.getType('voltage_grade')}">-->
					<!--<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{voltage}"></option>-->
					<!--</select>-->
					<select id="voltages" class="form-control" name="voltage" th:field="*{voltage}">
						<option value="10kv">10kv</option>
						<option value="400v">400v</option>
						<option value="220v">220v</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">变压器容量：</label>
				<div class="col-sm-8">
					<input id="volume" name="volume" th:field="*{volume}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">运维班组：</label>
				<div class="col-sm-8">
					<input id="runTeam" name="runTeam" th:field="*{runTeam}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">所属站房：</label>
				<div class="col-sm-8">
					<input id="station" name="station" th:field="*{station}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">运行状态：</label>
				<div class="col-sm-8">
					<input id="runStatus" name="runStatus" th:field="*{runStatus}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">投运日期：</label>
				<div class="col-sm-8">
					<input id="runDate" name="runDate"
						   th:value="${#dates.format(bByq.runDate,'yyyy-MM-dd')}" class="form-control" type="date">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">生产厂家：</label>
				<div class="col-sm-8">
					<input id="factory" name="factory" th:field="*{factory}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">安装形式：</label>
				<div class="col-sm-8">
					<input id="installType" name="installType" th:field="*{installType}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">结线别组：</label>
				<div class="col-sm-8">
					<input id="lineTeam" name="lineTeam" th:field="*{lineTeam}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">相数：</label>
				<div class="col-sm-8">
					<input id="xNumber" name="xNumber" th:field="*{xNumber}" class="form-control" type="text" readonly>
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">资产单位：</label>
				<div class="col-sm-8">
					<input id="unit" name="unit" th:field="*{unit}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">所属10kv线路ID：</label>
				<div class="col-sm-8">
					<input id="line10kvId" name="line10kvId" th:field="*{line10kvId}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">所属10kv线路名称：</label>
				<div class="col-sm-8">
					<!--<input id="line10kvName" name="line10kvName" th:field="*{line10kvName}" class="form-control" type="text">-->
					<input id="line_names" name="line10kvName" th:field="*{line10kvName}" class="form-control" type="text" onclick="chooseUpLine()" readonly>
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">归属单位：</label>
				<div class="col-sm-8">
					<input id="treeName" name="deptName" th:field="*{deptName}" class="form-control" type="text" onclick="selectDeptTree()">
				</div>
			</div>
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">资产性质：</label>
				<div class="col-sm-8">
					<input id="natureQuality" name="natureQuality" th:field="*{natureQuality}" class="form-control" type="text">
				</div>
			</div>

			<!--<div class="layui-layer-btn layui-layer-btn-" >
				<input class="btn btn-success" type="button" id="queryPoint" onclick="submitPoint()" value="提交" />
			</div>-->

		</form>


    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "assets/pPoint";
		$("#form-pPoint-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		/*function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-pPoint-edit').serialize());
	        }
	    }*/


        /**
         * 	选择线路
         */
        function chooseLine(){
            //	打开方式一
            layer.open({
                type: 2,
                title: '线路选择',
                area: ['770px', '340px'],
                fixed: false, //不固定
                maxmin: true,
                content: ctx+"assets/iLine/chooseLine",
                btn: ['确定', '关闭'],
                // 弹层外区域关闭
                shadeClose: true,
                yes: function (index,layero) {
                    var body = layer.getChildFrame('body', index);//得到iframe页的body内容
                    $("#line_id").val(body.find('#line_id').val());
                    $("#line_name").val(body.find('#line_name').val());
                    layer.close(index);
                },
                cancel: function(index) {
                    return true;
                }
            });
        }


        function submitPoint(){
            //	 点位表修改
            $.ajax({
                url : ctx + "assets/pPoint/edit",
                type : "POST",
                data : $('#form-pPoint-edit').serialize(),
                dataType: "json",
                error : function(request) {
                    $.modal.alertError("系统错误");
                },
                success : function(data) {
//                    $.modal.msgSuccess("修改成功");
                    //	变压器表修改
                    $.ajax({
                        url : ctx + "assets/bByq/edit",
                        type : "POST",
                        data : $('#form-bByq-edit').serialize(),
                        dataType: "json",
                        error : function(request) {
                            $.modal.alertError("系统错误");
                        },
                        success : function(data) {
                            $.modal.msgSuccess("修改成功");
                        }
                    });
                }
            });


		}

	</script>
</body>
</html>
